package model.Actions;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import DB.Connection.DBConnectionManager;

import commons.Entities.Comment;

import controller.ControllerFunctions;

public class addCharacterCommentAction implements Runnable {

	private static final Log logger = LogFactory.getLog(addCharacterCommentAction.class);

	private Comment comment;

	public addCharacterCommentAction(Comment comment) {
		this.comment = comment;
	}

	@Override
	public void run() {
		logger.info("addCharacterCommentAction starting...");

		DBConnectionManager.get().insertToCommentsTable(comment);
		ControllerFunctions.get().getCharacterComments(comment.getCharacterID());

		logger.info("addCharacterCommentAction ended.");
	}
}
